/*
 * Copyright user2010
 * All rights reserved
 */

package org.myorg.applitest.gui.swing.components.frame;

import org.myorg.applitest.gui.swing.components.panel.*;
import org.myorg.applitest.jdbc.connection.ConAddRegUsrScr;
import org.myorg.applitest.loggin.PropsDbLogin;
import java.awt.event.ActionListener;


/**
 *
 * @author user
 */
public class FrmNewItmRegUsrScr extends FrmNewItmRegUsrAbs implements ActionListener{
    public FrmNewItmRegUsrScr() throws Exception
    {
        this.pnl = new PnlNewItmRegUsrScr(lst_);
        this.setTitle("Secrétaire");
        this.add(pnl);
    }

    protected boolean _doJob() throws Exception{
        ConAddRegUsrScr con = new ConAddRegUsrScr();
        con.setValues(
            this.pnl.getIdentiteNom(),
            this.pnl.getIdentitePrenom1(),
            this.pnl.getIdentitePrenom2(),
            this.pnl.getIdentitePrenom3(),
            this.pnl.getIdentiteDateNaissance(),
            this.pnl.getIdentiteSexe(),
            this.pnl.getPersonnelMail(),
            this.pnl.getTravailMail(),
            this.pnl.getPersonnelFixe(),
            this.pnl.getTravailFixe(),
            this.pnl.getPersonnelPortable(),
            this.pnl.getTravailPortable(),
            this.pnl.getAdresseVoie(),
            this.pnl.getAdresseNumero(),
            this.pnl.getAdresseLigne1(),
            this.pnl.getAdresseLigne2(),
            this.pnl.getAdresseCode(),
            this.pnl.getAdresseVille(),
            this.pnl.getAdressePays(),
            this.pnl.getLogin(),
            this.pnl.getPassword()
            );
        return con.doJob(
            PropsDbLogin.getSingletonObject().getCurrentUserLogin(),
            PropsDbLogin.getSingletonObject().getCurrentUserPassword()
        );

    }
    private PnlNewItmRegUsrScr pnl;
}

